﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ID="registerTitle" ContentPlaceHolderID="TitleContent" runat="server">
	Create application
</asp:Content>
<asp:Content ID="registerContent" ContentPlaceHolderID="MainContent" runat="server">
	<% using (Html.BeginForm())
	 { %><div class="pagetitle">
		<h1>
			Mail: <em>New</em>
			</h1>
	</div>
	<div class="pagecontent">
		<p>
			Use the form below to create a new mail.
		</p>
		<%= Html.ValidationSummary("Creation was unsuccessful. Please correct the errors and try again.") %>
		
		<div>
			<fieldset class="group">
				<legend>Mail information</legend>
				<div class="groupcontent">
					<p>
						<label for="name">
							Name:</label>
						<%= Html.TextBox("name") %>
						<%= Html.ValidationMessage("name") %>
					</p>
					<p>
						Recipient lists:<br />
						<% foreach (var v in (IList<Mailer.Model.Types.List>)ViewData["Lists"])
		 { %>
						<input type="checkbox" name="lists" value="<%=v.ID%>">
						<%= v.Name %>
						<% }  %>
					</p>
					<p>
						Import HTML body from URL:<br />
						<%= Html.TextBox( "importhtml", "" ) %>
					</p>
					<p>
						Import Plaintext body from URL:<br />
						<%= Html.TextBox( "importplaintext", "" ) %>
					</p>
				</div>
			</fieldset>
		</div>
	</div>
	<div class="pageactions">
		<p>
			<input type="submit" value="Create mail" />
		</p>
	</div>
		<% } %>
</asp:Content>
